<?php
class SearchSubmission extends DataObject{
    private static $db = array(
        'TextSearch' => 'Varchar(255)'
    );
    private static $has_one = array();
    public function getCustomSearchContext() {
        $fields = $this->scaffoldSearchFields(array(
            'restrictFields' => array('TextSearch')
        ));

        $filters = array(
            'PublicProperty' => new PartialMatchFilter('TextSearch'),
        );

        return new SearchContext(
            $this->class,
            $fields,
            $filters
        );
    }
}